home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / MEDICAL / 2608A.ZIP / GP.ZIP / PREPORT.SRC < prev    next >
Text File  |  1990-11-03  |  3KB  |  209 lines

  1. ;\|
  2. ;PREPORT.SRC     Translated from PREPORT.EDT by Roger Mathew's EDT2SRC Ver 4.11
  3. ;PREPORT  11:44:19 AM  25/ 9/90  |
  4. DO_DEFINES:
  5. define(TOT_RECORDS|N|8||)
  6. define(PAGE|N|5||)
  7. define(SELECT_FROM1|D|10||)
  8. define(SELECT_THRU1|D|10||)
  9. define(SELECT_FROM2|S|8||)
  10. define(SELECT_THRU2|S|8||)
  11. define(BREAK_FIELD|D| 10||)
  12. define(TD|D|10||)
  13. OPEN_FILES:
  14. open(PATIENT|||)
  15. open(RECALLS|||)
  16. open(PAEDS|||)
  17. trap(Q|G|EXIT)
  18. date(TD|G)
  19. MOUNT_SCR:
  20. mount(SELECT|S)
  21. START:
  22. SELECT_FROM1 = (TD)
  23. enter(SELECT_FROM1|||START|||||)
  24. SELECT_THRU1 = (TD+2190)
  25. enter(SELECT_THRU1||||||||)
  26. MOUNT_RPT:
  27. pchr(p|4)
  28. pset(80|66|60)
  29. trap(I|G|ABORT_RPT)
  30. trap(R|S|DO_RELATED)
  31. trap(P|S|PRT_TOF)
  32. mount(PREPORT|R|A)
  33. FIND_FIRST:
  34. find(E|DATE.OF.BIRTH|NO_RECS|)
  35. PRT_DETAIL:
  36. if DATE.OF.BIRTH < (SELECT_THRU1) goto FINISH
  37. gosub CHK_BREAK
  38. pfmt(3||||)
  39. TOT_RECORDS = (TOT_RECORDS + 1)
  40. FIND_NEXT:
  41. find(P|PATIENT|FINISH|)
  42. goto PRT_DETAIL
  43. ABORT_RPT:
  44. pmsg(""|||N|N|D|)
  45. pmsg(""|||N|N|D|)
  46. pmsg(">>>>>  Report was terminated before completion  <<<<<"|||N|N|D|)
  47. pmsg(""|||N|N|D|)
  48. pmsg(""|||N|N|D|)
  49. FINISH:
  50. pblnk(2)
  51. pmsg("        Total records printed: ";TOT_RECORDS|||N|N|D|)
  52. trap(P|D)
  53. ptof
  54. EXIT:
  55. run("recmenu")
  56. DO_RELATED:
  57. clr(RECALLS|B)
  58. clr(PAEDS|B)
  59. trap(R|D)
  60. find(R|COD.REF|RECORD.NUMBER|NEXTONE|)
  61. if COD.D[5] = (0) goto NEXTONE
  62. find(R|P_COD|COD.REF|NEXTONE|)
  63. NEXTONE:
  64. trap(R|S|DO_RELATED)
  65. ret
  66. PRT_TOF:
  67. pfmt(1||||)
  68. pfmt(2||||)
  69. ret
  70. CHK_BREAK:
  71. pfmt(4||||)
  72. pfmt(5||||)
  73. ret
  74. NO_RECS:
  75. MESSAGE[1] = ("There are no records in the primary file")
  76. NUM.MSG = (1)
  77. gosub PRT.MSG
  78. goto EXIT
  79. NO_RFIND:
  80. MESSAGE[1] = ("A matching record was not found during a related find")
  81. NUM.MSG = (1)
  82. gosub PRT.MSG
  83. goto EXIT
  84. PRT.MSG:
  85. define(LNE.LNGTH|N|2||)
  86. define(LNE.LN2|N|2||)
  87. define(NUM.MSG|N|2||)
  88. define(MESSAGE|A|78||15)
  89. define(ENT.MASK|A|10||)
  90. define(LLC|N|2||)
  91. define(WD|N|2||)
  92. define(HT|N|2||)
  93. define(MCNTR|N|5||)
  94. define(MCNTR2|N|5||)
  95. define(MCNTR3|N|5||)
  96. define(MCNTR4|N|5||)
  97. LNE.LNGTH = (0)
  98. for(MCNTR|1|NUM.MSG|1)
  99. {
  100. LNE.LN2 =siz(A|MESSAGE[MCNTR])
  101. if LNE.LN2 > (LNE.LNGTH) then LNE.LNGTH = (LNE.LN2)
  102. }
  103. NUM.MSG = (NUM.MSG + 1)
  104. if LNE.LNGTH < (26) then LNE.LNGTH = (26)
  105. LNE.LNGTH = (LNE.LNGTH + 4)
  106. LLC = (40 - (LNE.LNGTH / 2))
  107. HT = (NUM.MSG + 3)
  108. WD = (LNE.LNGTH + 1)
  109. saves(1)
  110. window(LLC|24|HT|WD)
  111. NUM.MSG = (NUM.MSG - 1)
  112. pmsg(""||||||)
  113. for(MCNTR|1|NUM.MSG|1)
  114. {
  115. pmsg(MESSAGE[MCNTR]|3||N|N|S|)
  116. }
  117. pmsg("Press any key to continue"|3||Y|N|S|)
  118. redsp(1)
  119. ret
  120. \STSELECT  
  121.                   Selection Screen For Paediatric Survey
  122.  
  123. ════════════════════════════════════════════════════════════════════════════════
  124.  
  125.         Sort This Report By: DATE.OF.BIRTH
  126.  
  127. ────────────────────────────────────────────────────────────────────────────────
  128.  
  129.  Select:
  130.     Where DATE.OF.BIRTH   is From: &
  131.       and DATE.OF.BIRTH   is Thru: &
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145. \
  146. SELECT_FROM1
  147. SELECT_THRU1
  148. \
  149. \R PREPORT 
  150. PAEDIATRIC SURVEILLANCE ON : &
  151. ============================
  152. &                           &                      &
  153.     RECALL DATE:      &
  154.                          PDATES:&           &            &           &
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198. \
  199. TD
  200. PATIENT.NAME
  201. ADDRESS1
  202. DATE.OF.BIRTH
  203. COD.D[5]
  204. PDATE1
  205. PDATE2
  206. PDATE3
  207. PDATE4
  208. \
  209.